package mysql

import (
	"fmt"
	"github.com/jmoiron/sqlx"
)

func delete(db *sqlx.DB) error {
	res,err:=db.Exec("delete from person where user_id=?", 2)
	if err != nil {
		fmt.Println("exec failed, ", err)
		return err
	}

	row,err := res.RowsAffected()
	if err != nil {
		fmt.Println("rows failed, ",err)
		return err
	}

	fmt.Println("delete succ: ",row)
	return err
}
